Matthias Clasen [Sun, 4 Oct 2020 00:08:29 +0000 (20:08 -0400)]
scale: Make draw-value default to FALSE
This is rarely what you want, so lets turn it off
by default.
Update the one place in our demos where we want to
draw a value, add support for this to gtk-builder-tool,
add a test and mention this change in the migration
guide.
Matthias Clasen [Sat, 3 Oct 2020 23:42:19 +0000 (19:42 -0400)]
Fix Emoji completion
This is some late fallout from the container removal.
Matthias Clasen [Sat, 3 Oct 2020 23:41:26 +0000 (19:41 -0400)]
widget-factory: Enable emoji completion somewhere
Without a quick way to test this, it is bound to
fall apart. As it has.
Matthias Clasen [Sat, 3 Oct 2020 19:27:15 +0000 (19:27 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #506
See merge request GNOME/gtk!2655
Matthias Clasen [Sat, 3 Oct 2020 17:30:42 +0000 (13:30 -0400)]
textbuffer: Improve some get_iter apis
Make these functions return FALSE if they did not
return the exact position that was requested.
Adapt tests.
Based on a patch by Sebastien Wilmet
Fixes: #506
Matthias Clasen [Sat, 3 Oct 2020 16:22:05 +0000 (12:22 -0400)]
testsuite: Add a test that checks for property accessors
Make sure that every object property in GTK has accessors for getting
its value (if the property is readable) or setting it (if it is
writable).
Since we are still missing accessors, the test is allowed to
fail for now. Sadly, mesons xfail support is busted, so we just
disable the test entirely :(
Based on initial work by Benjamin Otte.
Related: #2440
Matthias Clasen [Sat, 3 Oct 2020 17:02:38 +0000 (13:02 -0400)]
spinbutton: Add some missing accessors
Add a setter and getter for the climb-rate property.
Matthias Clasen [Sat, 3 Oct 2020 16:52:19 +0000 (12:52 -0400)]
Cosmetics
Matthias Clasen [Sat, 3 Oct 2020 16:20:58 +0000 (12:20 -0400)]
text: Add some missing setters and getters
Add getters and setters for the enable-emoji-completion,
propagate-text-width and truncate-multiline properties.
Matthias Clasen [Sat, 3 Oct 2020 15:36:14 +0000 (11:36 -0400)]
directorylist: Drop the item-type property
No need for this to be a property.
This showed up in a test for missing accessors.
Matthias Clasen [Sat, 3 Oct 2020 15:25:35 +0000 (11:25 -0400)]
icontheme: Add a missing getter
We want to have a get_display() method on every object
that is tied to the display, so add one here.
Matthias Clasen [Sat, 3 Oct 2020 15:07:14 +0000 (11:07 -0400)]
colorbutton: Properly override interface properties
This showed up in a test for missing property accessors.
Matthias Clasen [Sat, 3 Oct 2020 13:46:38 +0000 (09:46 -0400)]
node-editor: Don't insert hyphens
This can be a bit confusing in multi-line strings.
Matthias Clasen [Sat, 3 Oct 2020 13:45:28 +0000 (09:45 -0400)]
gsk: Avoid long lines in serialized nodes
When encoding big blobs of data in base64, insert newlines.
Base64 allows it, CSS allows it, so not need to make GtkTextView
struggle with multi-megabyte lines.
Update nodeparser tests to reflect this change.
Matthias Clasen [Sat, 3 Oct 2020 04:01:25 +0000 (00:01 -0400)]
gtk-demo: Rename the transition shader files
Easier to find them when their name matches the title
that we show in the UI.
Matthias Clasen [Sat, 3 Oct 2020 03:55:32 +0000 (03:55 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #2261 and #1002
See merge request GNOME/gtk!2654
Matthias Clasen [Sat, 3 Oct 2020 03:54:15 +0000 (23:54 -0400)]
gtk-demo: Fix a typo
Matthias Clasen [Sat, 3 Oct 2020 02:31:29 +0000 (22:31 -0400)]
Allow inserting newlines in css strings
Rename _gtk_css_print_string to strip the _ and add
an insert_newlines argument to it. Update all callers,
and make the render node serializer insert newlines.
Matthias Clasen [Sat, 3 Oct 2020 02:28:17 +0000 (22:28 -0400)]
css: Move _gtk_css_print_string around
Move this to a separate header, since it is not
parser functionality, and kill the duplicate
gtkcssparserprivate.h header.
Jakub Steiner [Fri, 2 Oct 2020 15:09:07 +0000 (15:09 +0000)]
Merge branch 'stackswitcher-button-styling' into 'master'
Adwaita: Simplify stackswitcher button styling
See merge request GNOME/gtk!2498
Matthias Clasen [Fri, 2 Oct 2020 03:35:06 +0000 (23:35 -0400)]
emojichooser: Allow inserting multiple Emoji
Don't close the Emoji chooser when the Control
key is held while clicking. So you can insert
multiple Emoji without having to reopen the
chooser every time.
Fixes: #1002
Matthias Clasen [Fri, 2 Oct 2020 01:25:39 +0000 (21:25 -0400)]
Add a test for gsk_gl_shader_compile
This is not super useful, but at least we can
test that we get an error message including the
shader text.
Matthias Clasen [Thu, 1 Oct 2020 23:33:43 +0000 (19:33 -0400)]
gdk: Remove an unused variable
Matthias Clasen [Thu, 1 Oct 2020 21:14:58 +0000 (17:14 -0400)]
Add GTK_INPUT_HINT_PRIVATE
Add a flag that requests that input methods should not
update personalized data (such as typing history).
Fixes: #2261
Matthias Clasen [Thu, 1 Oct 2020 21:07:53 +0000 (17:07 -0400)]
docs: Fix a copy-paste error
Matthias Clasen [Thu, 1 Oct 2020 19:14:33 +0000 (15:14 -0400)]
Update the release script
If things go according to plan, we don't need to include
gtk-doc as a subproject in the next snapshot.
Matthias Clasen [Thu, 1 Oct 2020 19:11:37 +0000 (15:11 -0400)]
Use gtk-doc from master
I've merged the relevant parts from the gtk-doc-for-gtk4
branch.
Matthias Clasen [Thu, 1 Oct 2020 19:08:50 +0000 (15:08 -0400)]
Require gtk-doc 1.33
We'll hopefully get a gtk-doc release out with that
version number soon.
Matthias Clasen [Thu, 1 Oct 2020 17:48:08 +0000 (13:48 -0400)]
Cosmetics
Matthias Clasen [Thu, 1 Oct 2020 14:21:34 +0000 (14:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3220
See merge request GNOME/gtk!2652
Matthias Clasen [Thu, 1 Oct 2020 13:56:37 +0000 (13:56 +0000)]
Merge branch 'master' into 'matthiasc/for-master'
# Conflicts:
# .gitlab-ci/test-msys2.sh
Matthias Clasen [Thu, 1 Oct 2020 13:50:02 +0000 (13:50 +0000)]
Merge branch 'ci-win32-introspection-enabled' into 'master'
CI: Enable introspection again for the Windows build
See merge request GNOME/gtk!2651
Christoph Reiter [Thu, 1 Oct 2020 13:16:18 +0000 (15:16 +0200)]
CI: Enable introspection again for the Windows build
The underlying bug was fixed in glib and backported in MSYS2:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1665
Matthias Clasen [Thu, 1 Oct 2020 12:01:23 +0000 (12:01 +0000)]
Merge branch 'wip/jimmac/infosearch-close' into 'master'
Adwaita: close button for infobar, searchbar
Closes #3215
See merge request GNOME/gtk!2650
Matthias Clasen [Thu, 1 Oct 2020 11:59:30 +0000 (07:59 -0400)]
Revert "Fix the build with cups < 2.3"
This reverts commit
d761e3cf2c31b91269a3dbfd64a553decdeec51c.
I am seeing PPD_CUSTOM_UNKNOWN in the cups headers in our
ci images, and that is cups 2.2.12. So this commit was
mistaken.
Matthias Clasen [Thu, 1 Oct 2020 11:37:44 +0000 (07:37 -0400)]
ci: Give up on sysprof for now
Using sysprof and glib as subprojects of the same
project sadly does not work. Subprojects are not
as robust as they should be.
Jakub Steiner [Thu, 1 Oct 2020 11:13:10 +0000 (13:13 +0200)]
Adwaita: close button for infobar, searchbar
fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3215
Matthias Clasen [Thu, 1 Oct 2020 03:37:09 +0000 (23:37 -0400)]
ci: Try to get everything building again
It turns out that the sysprof meson setup does not
work with meson 0.54 :( So version 25 of our ci images
bumps the meson version to 0.55.3.
Matthias Clasen [Wed, 30 Sep 2020 20:21:39 +0000 (16:21 -0400)]
build: Try to fix docs+subprojects
Apparently, subprojects don't have pkgconfig variables :(
Matthias Clasen [Wed, 30 Sep 2020 20:09:56 +0000 (16:09 -0400)]
build: Remove an unneeded version check
We are requiring a newer meson than we were checking
for here.
Matthias Clasen [Wed, 30 Sep 2020 19:53:15 +0000 (15:53 -0400)]
ci: Remove --fatal-meson-warnings
meson adds features that then trigger warnings when we run
a newer meson over some of our subprojects. This is all too
fragile.
Matthias Clasen [Wed, 30 Sep 2020 19:41:05 +0000 (15:41 -0400)]
gtk-demo: Add the shader paintable sources
This is currently not public GTK api, just part of
the demo. So we should show it here.
Matthias Clasen [Wed, 30 Sep 2020 19:39:30 +0000 (15:39 -0400)]
gsk: Fix compiler warnings
We forgot to teach the broadway renderer about new enum
values, and our ci didn't catch it because werror didn't
actually work there until now.
Matthias Clasen [Wed, 30 Sep 2020 19:10:34 +0000 (15:10 -0400)]
build: Require meson 0.54
Matthias Clasen [Wed, 30 Sep 2020 18:45:47 +0000 (14:45 -0400)]
ci: Really enable werror
We wanted to enable werror for gtk without enabling it
for all our subprojects. Sadly, we failed. Try again
Matthias Clasen [Wed, 30 Sep 2020 19:25:51 +0000 (15:25 -0400)]
ci: Use the v24 images
These images have meson 0.54.
Matthias Clasen [Wed, 30 Sep 2020 19:12:32 +0000 (15:12 -0400)]
ci: Use a newer meson in images
We need meson 0.54.
Xavier Claessens [Wed, 30 Sep 2020 13:41:28 +0000 (09:41 -0400)]
meson: Change introspection option to yielding feature
Yielding option means that if pango is built as a subproject, it will
take the value of that option from the parent project (e.g. gst-build).
For that to work it must be of the same type, which is "feature" instead
of "boolean" in all GStreamer modules.
Benjamin Otte [Wed, 30 Sep 2020 17:48:24 +0000 (17:48 +0000)]
Use correct child widget when measuring
Fixes a copy/paste error.
Fixed #3220
Matthias Clasen [Wed, 30 Sep 2020 17:50:21 +0000 (17:50 +0000)]
Merge branch 'introspection' into 'master'
meson: Change introspection option to yielding feature
See merge request GNOME/gtk!2648
Benjamin Otte [Wed, 30 Sep 2020 17:48:24 +0000 (17:48 +0000)]
Use correct child widget when measuring
Fixes a copy/paste error.
Fixed #3220
Matthias Clasen [Wed, 30 Sep 2020 17:40:59 +0000 (13:40 -0400)]
transition demo: Make buttons symbolic
It looks better.
Matthias Clasen [Wed, 30 Sep 2020 15:22:57 +0000 (15:22 +0000)]
Merge branch 'ebassi/for-master' into 'master'
demo: Replace g_print with g_debug
See merge request GNOME/gtk!2645
Matthias Clasen [Wed, 30 Sep 2020 15:19:12 +0000 (11:19 -0400)]
gtk-demo: Update text for the transitions demo
The fire is gone, but we have wobbly widgets!
Matthias Clasen [Wed, 30 Sep 2020 15:00:58 +0000 (15:00 +0000)]
Merge branch 'snazzy-demo' into 'master'
gtk-demo: Make gltransitions demo a bit snazzier
See merge request GNOME/gtk!2644
Alexander Larsson [Wed, 30 Sep 2020 14:26:03 +0000 (16:26 +0200)]
gtk-demo/gltransition: Replace fire background with more mellow blobs
Alexander Larsson [Wed, 30 Sep 2020 14:25:30 +0000 (16:25 +0200)]
gtk-demo: Use duck in transitions to get some alpha example
Xavier Claessens [Wed, 30 Sep 2020 13:41:28 +0000 (09:41 -0400)]
meson: Change introspection option to yielding feature
Yielding option means that if pango is built as a subproject, it will
take the value of that option from the parent project (e.g. gst-build).
For that to work it must be of the same type, which is "feature" instead
of "boolean" in all GStreamer modules.
Matthias Clasen [Wed, 30 Sep 2020 13:42:55 +0000 (13:42 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2647
Matthias Clasen [Wed, 30 Sep 2020 12:49:42 +0000 (08:49 -0400)]
Mention icon theme in the migration guide
This was requested in #3216.
Matthias Clasen [Wed, 30 Sep 2020 12:01:50 +0000 (08:01 -0400)]
icontheme: Clarify the docs
Mention that icons directly in /$app_id/icons/ are treated
as unthemed icons.
See #3216
Alexander Larsson [Wed, 30 Sep 2020 12:53:13 +0000 (14:53 +0200)]
gl renderer: Fix render node texture cache
We're caching two things, either a node itself being rendered, or a
parent storing a cached version of a child as rendered to an offscreen
the size and location of the parent.
If both the parent and child uses the cache this will cause a conflict in
the cache as it is currently use keying of a node pointer which will have
the same value for the node-as-itself and the child-node-of-the-parent.
We fix this by adding another part to the key "pointer_is_child" which means
we can have the same node pointer twice in the cache.
Additionally, in the child-is-rendered-offscreen case the offscreen
result actually depends on the position and size of the parent viewport,
so we need to store the parent bounds in that case.
Emmanuele Bassi [Wed, 30 Sep 2020 11:35:31 +0000 (12:35 +0100)]
demo: Replace g_print with g_debug
The GtkGears widget is a bit too chatty, especially when used inside
demos like the fishbowl. Let's use g_debug() instead of g_print() for
the GL debugging message.
Matthias Clasen [Tue, 29 Sep 2020 21:29:24 +0000 (17:29 -0400)]
Fix the release script some more
Still trying to master the tar commandline.
Alexander Larsson [Wed, 30 Sep 2020 09:40:37 +0000 (11:40 +0200)]
gtk-demo: Make gltransitions demo a bit snazzier
This adds a bunch of snazz to the gltransitions demo. It is perhaps
a bit overloaded now, but it demos everything that we can do.
Changes:
* The fire shader is now not a bin, it just renders an animating
background with no textures involved.
* The stacks don't all start on the same page.
* The shaderbin passes the mouse coordinate to the shader.
* The shaderbin allows specifying a "border" so that you can
cause effects outside the bin child (something that is new to gtk4).
* All the buttons and the stacks are now in shader-bins that runs
a wobbly-widget effect based on the mouse position that
wobbles outside the child allocation.
Matthias Clasen [Tue, 29 Sep 2020 21:52:37 +0000 (21:52 +0000)]
Merge branch 'small-cleanup' into 'master'
menubutton: Remove obsolete private method
See merge request GNOME/gtk!2643
Matthias Clasen [Tue, 29 Sep 2020 20:45:00 +0000 (20:45 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!2642
Matthias Clasen [Tue, 29 Sep 2020 19:07:13 +0000 (15:07 -0400)]
release script: Fix doc tarball generation
Strip one level from the directories.
Florian Müllner [Tue, 29 Sep 2020 18:46:18 +0000 (20:46 +0200)]
menubutton: Remove obsolete private method
It was only added for the fallback app menu in headerbars, which
has been removed in the meantime.
Emmanuele Bassi [Tue, 29 Sep 2020 18:48:55 +0000 (19:48 +0100)]
Add annotations for GtkBuildable virtual functions
Now that the functions that wrap them have gone away from the public
API, we need proper annotations for the virtual functions, otherwise
languages will not have enough information on nullable arguments and
ownership transfer.
Matthias Clasen [Tue, 29 Sep 2020 12:55:08 +0000 (08:55 -0400)]
3.99.2
Matthias Clasen [Tue, 29 Sep 2020 15:32:03 +0000 (11:32 -0400)]
gsk: Add some more shader docs
Do a pass over the docs and address minor inconsistencies,
cosmetics and formatting differences.
Mention GSK_DEBUG=shaders.
Matthias Clasen [Tue, 29 Sep 2020 18:44:07 +0000 (18:44 +0000)]
Merge branch 'snapshot-stack-optimize' into 'master'
Minor optimizations to GtkSnapshot state stack
See merge request GNOME/gtk!2641
Emmanuele Bassi [Tue, 29 Sep 2020 18:39:34 +0000 (19:39 +0100)]
Remove gtk-doc stanzas from private GtkBuildable API
Various functions were moved to the private GtkBuildable header by
commit
2715b3ec31256ee1c3e0276fdc0154cd8a69fa8e, but the functions still
have gtk-doc stanzas.
Alexander Larsson [Tue, 29 Sep 2020 14:03:06 +0000 (16:03 +0200)]
snapshot: Preallocate and don't memset the state stack
Most of the time the snapshot is less than 16 levels deep (did some testing
in gtk-demo), so lets pre-allocate 16 levels of state stack to avoid the
extra allocation most of the time.
Alexander Larsson [Tue, 29 Sep 2020 14:00:30 +0000 (16:00 +0200)]
gdkarray: Add support for GDK_ARRAY_NO_MEMSET
If all your callers already initialize the array element as needed,
then we don't need to memset it to zero first.
This is pretty useful for the snapshot state stack, because due
to the per-node-type data area the elements on the stack are
quite large, but often a lot of it is not used.
Alexander Larsson [Tue, 29 Sep 2020 13:57:33 +0000 (15:57 +0200)]
gdkarray: Inline splice and reserve
This inlines the splice and reserver GdkArray calls. These are
typically only called from the gdk_array_(append/set_size) functions
anyway, and inlining the caller means we can constant propagate the
constant arguments in those calls. Its hard to get exact numbers, but
in fishbowl i noticed a significant decrease in the time spent in
the array code when pushing and poping states.
Matthias Clasen [Tue, 29 Sep 2020 12:57:36 +0000 (12:57 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2639
Matthias Clasen [Tue, 29 Sep 2020 12:49:22 +0000 (12:49 +0000)]
Merge branch 'glshader-track-uniform-state' into 'master'
gl: Track the current uniform state for custom programs
See merge request GNOME/gtk!2638
Matthias Clasen [Tue, 29 Sep 2020 02:52:35 +0000 (22:52 -0400)]
docs: Document various entry ::activate signals
Matthias Clasen [Tue, 29 Sep 2020 02:43:42 +0000 (22:43 -0400)]
statusbar: Remove a misleading doc comment
Matthias Clasen [Tue, 29 Sep 2020 02:43:27 +0000 (22:43 -0400)]
snapshot: Document radial gradient apis
Matthias Clasen [Tue, 29 Sep 2020 02:43:17 +0000 (22:43 -0400)]
docs: Fix a typo
Matthias Clasen [Tue, 29 Sep 2020 02:28:09 +0000 (22:28 -0400)]
wayland: Match header and doc arguments
gtk-doc doesn't take this lightly.
Matthias Clasen [Tue, 29 Sep 2020 02:24:59 +0000 (22:24 -0400)]
gsk: Document radial gradient api
Matthias Clasen [Tue, 29 Sep 2020 02:12:31 +0000 (22:12 -0400)]
Silence a compiler warning
These variables are not used anymore since
commit
11e4a4696713bc.
Matthias Clasen [Tue, 29 Sep 2020 11:03:02 +0000 (07:03 -0400)]
NEWS: Updates
Alexander Larsson [Tue, 29 Sep 2020 09:52:39 +0000 (11:52 +0200)]
gl: Track the current uniform state for custom programs
This allows us to avoid updating uniforms if that is not necessary. This
in turn allows us to sometimes reuse the same draw op by just extending the
vertex array size we draw rather than doing a separate glDraw call.
For example, in the fishbowl demo, all the icons added at the same
time will have the same time and size, so we emit single draw calls
with 100s of triangles instead of 100s of draw calls with 2 triangles.
Alexander Larsson [Tue, 29 Sep 2020 08:30:48 +0000 (08:30 +0000)]
Merge branch 'glshader-node' into 'master'
Add support for GLShader nodes
See merge request GNOME/gtk!2594
Matthias Clasen [Wed, 23 Sep 2020 22:05:57 +0000 (18:05 -0400)]
Add some shader tests
These are just basic api usage tests, no rendering.
They found the issues fixed in the preceding commits.
Alexander Larsson [Tue, 29 Sep 2020 07:36:10 +0000 (09:36 +0200)]
gtk-demo: Add a shader paintable to the fishbowl
This gets around 500 instances at 60fps on my system.
Alexander Larsson [Mon, 21 Sep 2020 19:05:04 +0000 (21:05 +0200)]
gtk-demo: Add GskGLShaderNode demo
Add adds a demo showing off GskGLShaderNode in various ways.
It has a transistion widget, using some examples from
gl-transitions.com, with child widgets being both images, a GL area
and real widgets (that let you edit the transition shaders
themselves.
It also has a fancy fire effect on hove on the buttons.
Alexander Larsson [Fri, 18 Sep 2020 16:03:30 +0000 (18:03 +0200)]
Support GLShaderNode in backends
For vulkan/broadway this just means to ignore it, but for the gl
backend we support (with up to 4 texture inputs, which is similar to
what shadertoy does, so should be widely supported).
Alexander Larsson [Fri, 18 Sep 2020 15:56:02 +0000 (17:56 +0200)]
GtkSnapshot: Add gtk_snapshot_push_glshader()
Alexander Larsson [Fri, 18 Sep 2020 15:46:57 +0000 (17:46 +0200)]
Add GskGLShaderNode and GskGLShader
A GskGLShader is an abstraction of a GLSL fragment shader that
can produce pixel values given inputs:
* N (currently max 4) textures
* Current arguments for the shader uniform
Uniform types are: float,(u)int,bool,vec234)
There is also a builder for the uniform arguments which are
passed around as immutable GBytes in the built form.
A GskGLShaderNode is a render node that renders a GskGLShader inside a
specified rectangular bounds. It renders its child nodes as textures
and passes those as texture arguments to the shader. You also pass it
a uniform arguments object.
Matthias Clasen [Wed, 23 Sep 2020 20:17:56 +0000 (16:17 -0400)]
gsk: Add more shader debug spew
Print out the full assembled shader sources when
GSK_DEBUG=shaders is given. This is very verbose,
but may be useful to see what we actually pass
to the compiler.
Alexander Larsson [Mon, 28 Sep 2020 18:47:32 +0000 (20:47 +0200)]
GtkWindow: Create renderer before realizing child widgets
This way the child widgets can rely on the renderer (for example what
type it is) to decide details about how they render (such as if they
should use OpenGL shaders).
Matthias Clasen [Mon, 28 Sep 2020 17:09:54 +0000 (13:09 -0400)]
css: Move the last parser api to the new header
This lets us use it from the render node parser
in gsk.
Alexander Larsson [Wed, 23 Sep 2020 15:38:03 +0000 (17:38 +0200)]
shadertoy demo: Fix GLSL on GLES
I was getting "assignment to varying fragColor" errors
Alexander Larsson [Fri, 18 Sep 2020 09:35:29 +0000 (11:35 +0200)]
gl: Add some namespacing to the preamble symbols
This adds a gsk prefix to the stuff in the preamble, as we want to
avoid it conflicting with things in the main shader. Especially once
we start allow some customization of shaders.